package com.nbsaas.boot.product.data.entity;

import com.nbsaas.boot.code.annotation.*;
import com.nbsaas.boot.jpa.data.entity.AbstractEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Data;
import org.hibernate.annotations.Comment;

@CreateByUser
@ComposeView
@Data
@FormAnnotation(title = "商品品牌", model = "商品品牌")
@Entity
@Table(name = "bs_product_brand")
@Comment("商品品牌表")
public class ProductBrand extends AbstractEntity {

    @Comment("品牌名称")
    @SearchItem(name = "name", key = "name", label = "品牌名称")
    @FormField(title = "品牌名称", sortNum = "1", grid = true, required = true)
    @Column(length = 100, nullable = false)
    private String name;

    @Comment("品牌编码")
    @SearchItem(name = "code", key = "code", label = "品牌编码")
    @FormField(title = "品牌编码", sortNum = "2", grid = true)
    @Column(length = 50, unique = true)
    private String code;

    @Comment("品牌英文名")
    @FormField(title = "品牌英文名", sortNum = "3", grid = true)
    @Column(length = 100)
    private String englishName;

    @Comment("品牌Logo")
    @FormField(title = "品牌Logo", sortNum = "4", type = InputType.image)
    @Column(length = 500)
    private String logo;

    @Comment("品牌图片")
    @FormField(title = "品牌图片", sortNum = "5", type = InputType.image)
    @Column(length = 500)
    private String image;

    @Comment("品牌描述")
    @FormField(title = "品牌描述", sortNum = "6", type = InputType.richText, col = 23)
    @Column(length = 2000)
    private String description;

    @Comment("品牌官网")
    @FormField(title = "品牌官网", sortNum = "7", grid = true)
    @Column(length = 200)
    private String website;

    @Comment("品牌排序")
    @FormField(title = "品牌排序", sortNum = "8", grid = true, type = InputType.el_input_number, sort = true)
    private Integer sort;

    @Comment("是否推荐")
    @FormField(title = "是否推荐", sortNum = "9", grid = true, type = InputType.select)
    private Boolean recommended;

    @Comment("是否启用")
    @FormField(title = "是否启用", sortNum = "10", grid = true, type = InputType.select)
    private Boolean enabled;

    @Comment("SEO标题")
    @FormField(title = "SEO标题", sortNum = "11")
    @Column(length = 200)
    private String seoTitle;

    @Comment("SEO关键词")
    @FormField(title = "SEO关键词", sortNum = "12")
    @Column(length = 500)
    private String seoKeywords;

    @Comment("SEO描述")
    @FormField(title = "SEO描述", sortNum = "13")
    @Column(length = 1000)
    private String seoDescription;

    @Comment("备注")
    @FormField(title = "备注", sortNum = "14", type = InputType.richText, col = 23)
    @Column(length = 1000)
    private String note;
} 